package com.xxgc.qiuqiu.controller;

import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Controller;

//用于接收和广播游戏的数据
@Controller
public class WebSocketController {
    @MessageMapping("/position")
    @SendTo("/game/position")
    public String position(String msg){
        System.out.println("msg = " + msg);
        return msg;
    }
}
